import { baseURL } from "./config";

export default function(options){
  return new Promise((res,rej) => {
    wx.request({
      url: baseURL + options.url,
      method: options.method || 'GET',
      data: options.data || {},
      success: res,
      fail: rej
    })
  })
}